import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ichinesereader/utils/log.dart';
import 'package:ichinesereader/widgets/tabs/resetpasswordByEmail.dart';
import 'package:ichinesereader/widgets/tabs/resetpasswordBySecurityCodeTab.dart';

class ResetPasswordTabsPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    Log.debug('build ResetPasswordTabsPage');
    return Scaffold(
        body: Container(
            //padding: const EdgeInsets.all(8.0),
            child: DefaultTabController(
      length: 2,
      child: Scaffold(
        appBar: AppBar(
          bottom: TabBar(
            labelStyle: TextStyle(
              fontFamily: 'Montserrat',
              color: Theme.of(context).primaryColorLight,
            ),
            indicatorColor: Color(0xffd8ffff),
            indicatorSize: TabBarIndicatorSize.label,
            indicatorWeight: 7,
            tabs: [
              Tab(
                child: Text(
                  'Reset by Security Code'.tr,
                  style: TextStyle(
                    color: Theme.of(context).primaryColorLight,
                    fontSize: 16.0,
                    letterSpacing: 1.0,
                    fontFamily: 'Montserrat',
                  ),
                ),
              ),
              Tab(
                child: Text(
                  "Reset by Email".tr,
                  style: TextStyle(
                    color: Color(0xffd8ffff),
                    fontSize: 16.0,
                    letterSpacing: 1.0,
                    fontFamily: 'Montserrat',
                  ),
                ),
              ),
            ],
          ),
          title: Text(
            'Reset Password'.tr,
            style: TextStyle(
              fontFamily: 'Montserrat',
              letterSpacing: 1.0,
            ),
          ),
        ),
        body: TabBarView(
          children: [
            ResetPasswordByIdentifierTab(),
            ResetPasswordByEmailTab(),
          ],
        ),
      ),
    )));
  }
}
